package tictactoe;

import junit.framework.Assert;
import org.junit.Test;
import tictactoe.clientprocessors.MultiClientProcessor;
import tictactoe.clientprocessors.SingleClientProcessor;
import tictactoe.gameprocessors.MultiGameProcessor;
import tictactoe.gameprocessors.SingleGameProcessor;

/**
 * Created by IntelliJ IDEA.
 * User: Double
 * Date: 16.01.12
 * Time: 4:19
 * To change this template use File | Settings | File Templates.
 */
public class ServerTest
{
	Server server = new Server();
	@Test
	public void testGetClientProcessor() throws Exception
	{
		if(Server.getClientProcessor() instanceof MultiClientProcessor || Server.getClientProcessor() instanceof SingleClientProcessor)
			Assert.assertTrue(true);

	}

	@Test
	public void testGetGameProcessor() throws Exception
	{
		if(Server.getGameProcessor() instanceof SingleGameProcessor || Server.getGameProcessor() instanceof MultiGameProcessor)
			Assert.assertTrue(true);

	}

	@Test
	public void testMain() throws Exception
	{
		Server.main(new String[]{"single","single"});
		if(Server.getClientProcessor() instanceof MultiClientProcessor && Server.getGameProcessor() instanceof SingleGameProcessor)
			Assert.assertTrue(true);

	}
}
